From: Ivan Molodetskikh Date: Mon, 20 Mar 2023 18:49:24 +0000 (-0700) Subject: screenshot: Use meta_window_has_pointer () for pointer check X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~371^2^2~79 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4daea0ccaeda3d752a9630437f65cfea100e63fa;p=gnome-shell.git screenshot: Use meta_window_has_pointer () for pointer check https://gitlab.gnome.org/GNOME/mutter/-/commit/909616b20876478bc56932cd18c8e85e982645f6 seems to have wrapped window actors in a container, so the actor.has_pointer check started failing. Instead, switch to meta_window_has_pointer () which doesn't rely on window actor implementation details. We check for existence of has_pointer first just in case someone attempts to run gnome-shell 44.1 with mutter 44.0 which does not have the function exported publicly yet. Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index fd84a74f8..59c63c71e 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -787,7 +787,7 @@ class UIWindowSelectorWindow extends St.Button { this._cursor = null; this._cursorPoint = { x: 0, y: 0 }; - this._shouldShowCursor = actor.get_children().some(c => c.has_pointer); + this._shouldShowCursor = window.has_pointer && window.has_pointer(); this.connect('destroy', this._onDestroy.bind(this)); }